import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vitePluginImport from "vite-plugin-babel-import";
import path from "path";
// import requireTransform from 'vite-plugin-require-transform'
export default defineConfig({
  plugins: [vue(),
  
  ],
  base: "./",
  resolve: {
    alias: {
      "~": path.resolve(__dirname, "./"),
      "@": path.resolve(__dirname, "./src"),
    },
  },
  server: {
    cors: true, // 允许跨域
    proxy: {
      "/baseApi": {
        target: 'http://meipaimy.sxkj.fun:8021',
        changeOrigin: true,
        secure: true,
        rewrite: (path) => path.replace("/baseApi/", "/"),
      },
    },
  },
});
